<template>
  <table>
    <thead>
      <tr>
        <th v-for="col in columns" :key="col.field">{{ col.label }}</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="row in dataList" :key="row.id">
        <td v-for="col in columns" :key="col.field">{{ row[col.field] }}</td>
      </tr>
    </tbody>
  </table>
</template>
<script setup lang="ts">
import { defineProps } from 'vue';
const props = defineProps<{ columns: { label: string, field: string }[], dataList: any[] }>();
</script> 